	<include file='Common:header' />

		<!-- /section:basics/navbar.layout -->
		<div class="main-container" id="main-container">

			<!-- #section:basics/sidebar -->

	<include file='Common:left' />
			<!-- /section:basics/sidebar -->
			<div class="main-content">
				<div class="main-content-inner">
					<div class="page-content">
					
					

							<div class="row maintop">
								<div class="col-xs-12 col-sm-2">
								<a href="__URL__/member_add">
								<button class="btn btn-xs btn-danger">
									<i class="ace-icon fa fa-bolt bigger-110"></i>
										添加会员
								</button>
								</a>
								</div>
								
								<div class="col-xs-12 col-sm-3">
								<form name="admin_list_sea" class="form-search" method="post" action="__URL__/member_list">
									<div class="input-group">
										<span class="input-group-addon">
											<i class="ace-icon fa fa-check"></i>
										</span>
										<input type="text" name="val" id="val" class="form-control search-query admin_sea" value="{$testval}" placeholder="输入需查询的用户名" />
										<span class="input-group-btn">
											<button type="submit" class="btn btn-xs  btn-purple">
												<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
												搜索
											</button>
										</span>
									</div>
								</form>
								</div>
  <div class="input-group-btn">
  	<a href="__URL__/member_list">
	<button type="button" class="btn btn-xs  btn-purple">
		<span class="ace-icon fa fa-globe icon-on-right bigger-110"></span>
		显示全部
	</button>
	</a>
  </div>
								
								
							</div>

		

							<div class="row">
							    <div class="col-xs-12">
										<div>
                                        <form id="leftnav" name="leftnav" method="post" action="" >
                                        <input type="hidden" name="checkk" id="checkk" value="1" /><!--用于判断操作类型-->
											<table width="100%" class="table table-striped table-bordered table-hover" id="dynamic-table">
												<thead>
													<tr>
													  <th width="10%">登录手机号</th>
													  <th width="17%">会员昵称</th>
													  <th width="10%">证件号码</th>
													  <th width="11%">推荐号码</th>
													  <th width="12%">注册时间</th>
													  <th width="8%">登陆次数</th>
													  <th width="9%" style="border-right:#CCC solid 1px;">状态</th>
													  <th width="8%" style="border-right:#CCC solid 1px;">操作</th>
												  </tr>
												</thead>

												<tbody>
                                                
                                                <foreach name="member_list" item="v">
													<tr>
														<td height="28" >{$v.member_tel}</td>
														<td>{$v.member_nickname}</td>
														<td>{$v.member_idcard}</td>
														<td>{$v.member_mynum}</td>
														<td>{$v.add_time|date='Y-m-d H:i:s',###}</td>
														<td>{$v.logins}</td>
														<td>
														<if condition='$v[member_state] eq 0'>
														<a class="red" href="javascript:;" onclick="return stateyes({$v.member_id});" title="账号开启">
														<div id="zt{$v.member_id}"><button class="btn btn-minier btn-yellow">账号开启</button></div>
														</a>
														<else/>
														<a class="red" href="javascript:;" onclick="return stateyes({$v.member_id});" title="账号停用">
														<div id="zt{$v.member_id}"><button class="btn btn-minier btn-danger">账号停用</button></div>
														</a>
														</if>
														</td>
														<td>
															<div class="hidden-sm hidden-xs action-buttons">
																<a class="green" href="{:U('member_list_edit',array('member_id'=>$v['member_id']))}" title="修改">
																	<i class="ace-icon fa fa-pencil bigger-130"></i>																</a>
																<if condition="$aid eq 1">
																<a class="red" href="javascript:;" onclick="return del({$v.member_id});" title="删除">
																	<i class="ace-icon fa fa-trash-o bigger-130"></i>																</a></if>															</div>														</td>
													</tr>
                                                 </foreach>   
                                                  <tr>
													  <td height="50" colspan="10" align="left">{$page}</td>
												  </tr>
												</tbody>
										  </table>
                                          </form>
							    		</div>
									</div>
								</div>

<include file='Common:header_nav' />

					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->


<script>
function del(id){
	layer.confirm('你确定要删除吗？', {icon: 3}, function(index){
	layer.close(index);
	window.location.href="__URL__/admin_list_del/member_id/"+id+"";
	});
}

function stateyes(val){
		  $.post('{:U("member_list_state")}',
		  {x:val},
	function(data){
	var $v=val;
		if(data.status){
			if(data.info=='账号停用'){
				var a='<button class="btn btn-minier btn-danger">账号停用</button>'
				$('#zt'+val).html(a);
				layer.alert(data.info, {icon: 5});
			}else{
				var b='<button class="btn btn-minier btn-yellow">账号开启</button>'
				$('#zt'+val).html(b);
				layer.alert(data.info, {icon: 6});
			}
			
		}
	});
	return false;
}
</script>
	<include file='Common:footer' />
    
		</div><!-- /.main-container -->
	</body>
</html>
